<link rel="stylesheet" type="text/css" href="{$smarty.const.THEME_RELATIVE}modules/imagegallerymodule/imagemodule.css" />
{permissions level=$smarty.const.UILEVEL_PERMISSIONS}
{if $permissions.administrate == 1}
	<a href="{link action=userperms _common=1}"><img class="mngmnt_icon" style="border:none;" src="{$smarty.const.ICON_RELATIVE}userperms.png" title="{$_TR.alt_userperm}" alt="{$_TR.alt_userperm}" /></a>
	<a href="{link action=groupperms _common=1}"><img class="mngmnt_icon" style="border:none;" src="{$smarty.const.ICON_RELATIVE}groupperms.png" title="{$_TR.alt_groupperm}" alt="{$_TR.alt_groupperm}" /></a>
{/if}
{/permissions}
{permissions level=$smarty.const.UILEVEL_NORMAL}
{if $permissions.configure == 1}
			<a href="{link action=configure _common=1}"><img class="mngmnt_icon" style="border:none;" src="{$smarty.const.ICON_RELATIVE}configure.png" title="{$_TR.alt_configure}" alt="{$_TR.alt_configure}" /></a>
{/if}
{if $permissions.configure == 1 or $permissions.administrate == 1}
	<br />
{/if}
{/permissions}
{if $moduletitle !=""}
	<div id="AlbumName" class="div-title-album-moi" >             
	  <span>{$moduletitle}              
	  </span>         
	</div>{/if}
	<div class="clear" style="display: block;">    
	</div>
{*End module title*}
{* Gallery here *}
<div class="imagemodule">
	{foreach name=a from=$galleries item=gallery}
	<div class="gallery" >
			<div class="gallery_box">
			  <a href="{link action=view_gallery id=$gallery->id}">
				<div class="gallery_image" {if $gallery->image_path !=""}style="background: url(phpThumb.php?src={$gallery->image_path}&h=140);" {/if}></div></a>
			</div>
			<div class="gallery_info">
				{permissions level=$smarty.const.UILEVEL_PERMISSIONS}
					<div class="itemactions">
					   {if $permissions.configure == 1 or $permissions.administrate == 1}
					   {if $permissions.edit == 1}
							 <a class="mngmntlink imagegallery_mngmntlink" href="{link action=edit_gallery id=$gallery->id}">
								<img class="mngmnt_icon" style="border:none;" src="{$smarty.const.ICON_RELATIVE}edit.png" title="{$_TR.alt_edit}" alt="{$_TR.alt_edit}" />
							 </a>
						{/if}
						{if $permissions.delete == 1}
							 <a class="mngmntlink imagegallery_mngmntlink" href="{link action=delete_gallery id=$gallery->id}">
								<img class="mngmnt_icon" style="border:none;" src="{$smarty.const.ICON_RELATIVE}delete.png" title="{$_TR.alt_delete}" alt="{$_TR.alt_delete}" />
						   </a>
						{/if}
				   {/if}
				  </div>
				  {/permissions}
				<div class="float-left">
					<span style="font-weight: bold;">{$gallery->image_count}</span> {$_TR.images}
				</div>
				<div class="float-right color_bbb" style="line-height: 33px;">
					{trim_name_to_fix text=$gallery->name length=20}
				</div>
			</div>
	</div>
	{if $smarty.foreach.a.index == 0}
	  <div style="width: 98%; color: #404040;">
		{$gallery->description }
	  </div>
	{/if}
	{if $smarty.foreach.a.index % 3 == 0}
	<div class="clear"></div>
	{/if}
	 {/foreach}
   <div class="clear">                     
   </div>
</div>
{*End of Image gallery*}
<br>
<div align=center>{paging current_page=$page pages=$page_count action=view_page module=imagegallerymodule page_length=4 src=$__loc->src}</div>

{permissions level=$smarty.const.UILEVEL_NORMAL}
{if $permissions.create == 1}
	<a class="mngmntlink imagegallery_mngmntlink" href="{link action=edit_gallery}">
		<img src="{$smarty.const.ICON_RELATIVE}mimetypes/image.png" /> New Gallery
	</a>
{/if}
{/permissions}
